import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import eslint from 'vite-plugin-eslint';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react(), eslint()],
  server: {
    port: 8081,
    host: true,
    open: true,
    proxy: {
      '/local-api': {
        target: 'http://localhost:8001/local-api',
        changeOrigin: true,
        rewrite: (p) => p.replace(/^\/local-api/, '')
      }
    }
  }
})
